$(function() {
  $.ajax({
    type: "get",
    url: "/cart/queryCart",
    dataType: "json",
    success: function(res) {
      //成功的回调函数
      console.log(res);

      if (res.error) {
        location.href = "./login.html";
      } else {
        $(".mui-table-view").html(template("tmp", { list: res }));
      }
    }
  });
});
